negotiator.boaframework.omstrategy
Class BestBid

java.lang.Object
  extended by negotiator.boaframework.OMStrategy
      extended by negotiator.boaframework.omstrategy.BestBid

public class BestBid
extends OMStrategy

This class uses an opponent model to determine the next bid for the opponent, while taking the opponent's preferences into account. The opponent model is used to select the best bid.

Author:
Mark Hendrikx

Field Summary
 
Fields inherited from class negotiator.boaframework.OMStrategy
model, negotiationSession
 
Constructor Summary
BestBid()
          Empty constructor for the BOA framework.
BestBid(NegotiationSession negotiationSession, OpponentModel model)
          Normal constructor used to initialize the BestBid opponent model strategy.
 
Method Summary
 boolean canUpdateOM()
          The opponent model may be updated, unless the time is higher than a given constant.
 BidDetails getBid(java.util.List<BidDetails> allBids)
          Returns the best bid for the opponent given a set of similarly preferred bids.
 void init(NegotiationSession negotiationSession, OpponentModel model, java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          Initializes the opponent model strategy.
 
Methods inherited from class negotiator.boaframework.OMStrategy
getBid, getBid, init, setOpponentModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BestBid

public BestBid()
Empty constructor for the BOA framework.


BestBid

public BestBid(NegotiationSession negotiationSession,
               OpponentModel model)
Normal constructor used to initialize the BestBid opponent model strategy.

Parameters:
negotiationSession - symbolizing the negotiation state.
model - used by the opponent model strategy.
Method Detail

init

public void init(NegotiationSession negotiationSession,
                 OpponentModel model,
                 java.util.HashMap<java.lang.String,java.lang.Double> parameters)
          throws java.lang.Exception
Initializes the opponent model strategy. If a value for the parameter t is given, then it is set to this value. Otherwise, the default value is used.

Overrides:
init in class OMStrategy
Parameters:
negotiationSession - state of the negotiation.
model - opponent model used in conjunction with this opponent modeling strategy.
parameters - set of parameters for this opponent model strategy.
Throws:
java.lang.Exception - thrown when initializing the opponent model strategy fails.

getBid

public BidDetails getBid(java.util.List<BidDetails> allBids)
Returns the best bid for the opponent given a set of similarly preferred bids.

Specified by:
getBid in class OMStrategy
Parameters:
list - of the bids considered for offering.
Returns:
bid to be offered to opponent.

canUpdateOM

public boolean canUpdateOM()
The opponent model may be updated, unless the time is higher than a given constant.

Specified by:
canUpdateOM in class OMStrategy
Returns:
true if model may be updated.